package creational.abstract_factory;

/**
 * @ClassName: MainTest
 * @Description: 测试类
 * @Author: liu-hao
 * @Date: 2023-05-19 23:01
 * @Version: 1.0
 **/
public class MainTest {
    public static void main(String[] args) throws Exception {

        AbstractFactory factory = new BmwFactory();

        Car car = factory.driverCar();
        Plane plane = factory.driverPlane();
        Tank tank = factory.driverTank();

        car.drive();
        plane.drive();
        tank.drive();
    }
}
